home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: newsfeed.internetmci.com!miwok!linex1!news
- From: mfried@linex.com (Marty Fried)
- Subject: Re: ***Newbie Help with arrays and linker errors!!!***
- X-Nntp-Posting-Host: sp25.linex.com
- Message-ID: <3154f90f.3453577@news.linex.com>
- Sender: news@linex1.linex.com
- Organization: Cirrius Cybernetics Corp
- X-Newsreader: Forte Agent .99e/32.194
- References: <315064BC.287C@maine.maine.edu>
- Date: Sun, 24 Mar 1996 07:29:22 GMT
-
- Once upon a time (OK, it was Wed, 20 Mar 1996 15:04:12 -0500),
- aspenc51 <aspenc51@maine.maine.edu> wrote:
-
- >I'm just starting to learn programming, and I've run into a sort of block with arrays. I've got this simple die
- >roller that rolls 4 six-sideds and subtracts the lowest of the 4 from the total, and I just can't get it to work.
- >I've looked for errors, but there are no complier problems my wrench-in-the-works is a single linker error.
- >(undefined symbol 'minimum(int, int)' in module 'diceroll.cpp') Can someone show me where things are running amuck?
- > This thing's driving me crazy! Just please e-mail me with your suggestions since my news server kind of only half
- >works.
- >
- >Here's the program (written under Borland 4.52 C++)
- > . . .
- >int randadd(int, int);
- >int minimum(int, int); <<<<< This is what the linker is looking for ***
- > . . .
- >int minimum( int roll_array[], int length) //finds minimum value
- >{
- > . . .
- > }
-
- You've told the linker that there is a function minimum that takes two
- ints, but you have only provided a function minimum that takes an int
- array and an int.
-
- cc aspenc51 <aspenc51@maine.maine.edu>
-
- _______________________________________________________
- Marty Fried - mfried@linex.com Press Enter to Exit
- San Anselmo, CA -NT message
- (MSVC4 + MFC) && (Win95 || NT);
-